package com.longfor.dragonshard.service;

import com.longfor.dragonshard.entity.Demo;
import com.longfor.drogon.common.service.IBaseService;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @author chi.zhang
 * @version v1.0
 * @create 2017-11-07 上午10:50
 **/
@Service
public interface IValidateService{

    /**
     * 生成验证码
     *
     * @param request
     * @return
     */
    Map<String, String> getValidate(HttpServletRequest request);

    /**
     * 校验验证码
     * 物理正确与否，都会删除
     *
     * @param validateKey
     * @param validateCode
     * @return
     */
    Boolean checkValidate(String validateKey, String validateCode);

}
